package com.zrsx.searchmodel.mapper;

import com.zrsx.searchmodel.common.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;

@Mapper
public interface UserMapper {

    /**
     * 查询用户注册时间
     * @param id
     * @return
     */
    @Select("SELECT create_time FROM user WHERE id = #{id}")
    public LocalDateTime selectRegisterTimeById(Integer id);

    @Select("SELECT * FROM user WHERE id = #{userId}")
    User selectById(Integer userId);
}
